package com.atguigu.mapper;

import com.atguigu.entities.User;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface UserMapper extends BaseMapper<User> {

    List<User> findByName(@Param("name") String name);

    IPage<User> findPageByAgeGreaterThanAndDeleted(Page<User> page, @Param("minAge") Integer minAge, @Param("deleted") Boolean deleted);


}